package com.yyt.elasticsearch.control;

import com.yyt.elasticsearch.service.TransTypeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

import java.util.List;

@Controller
public class TransTypeController {

    @Autowired
    TransTypeService transTypeService;

    @RequestMapping("/getTransType")
    public List getTransType(Model model){
        List typeList = null;
        try
        {
            typeList = transTypeService.getTransType();
            if(typeList!=null)
            {
                System.out.println("typeList:"+typeList);
            }

        } catch (Exception e)
        {
            e.printStackTrace();
        }
        return typeList;
    }


}
